package C11_12_ReplaceDelegationWithInheritance.refactorbefore;

/**
 * @ClassName : Person
 * @Description : 以继承取代委托
 * @Author : wukj1
 * @Date: 2022/8/16
 **/
public class Person {

    String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLastName() {
        return name.substring(name.lastIndexOf(' ') + 1);
    }
}
